In applications of optical sensors, usually a lens is installed on the optical path to focus light onto a sensor chip. For example, U.S. Patent Application Publication No. 2005/0093825 forms a lens structure on a carrier of an optical sensor. However, this art does not seal up the sensor chip and thus, suspended particles and other contaminations would easily attach on the sensitive surface of the sensor chip and thereby degrade the sensitivity of the sensor chip. Moreover, the sensor chip is too fragile to be polished, that makes the troubleshooting more difficult. To protect a sensor chip, various package structures have been proposed for enclosing the sensor chip, with only a light transmission hole on the package structure called an opening. For example, U.S. Patent Application Publication No. 2006/0256086 and Japan Patent Application Publication Nos. JP 10-267647 and 2000-322989 employ a cover having a lens structure to cover a sensor chip, and U.S. Pat. No. 6,967,321 employs a cover having a lens structure to block the opening of a package. However, these arts require extremely high precision package components to allow the lens structure to produce required focus effect. U.S. Pat. No. 7,326,932 directly attach a cap having an optical refractive surface onto a wafer, and U.S. Pat. No. 7,365,364 employs a semiconductor process to form dielectric and conductor layers on a sensor chip and then attaches a glass plate thereon. These two arts require even higher precision processes, the structure of the products are more fragile, and the process has to be carried out during the manufacturing process of the sensor chip. Alternatively, U.S. Pat. No. 7,050,043 attaches a lens on the opening of the package frame of a sensor chip. Although this art needs less precision on the assembly components and less costs, it still requires extra optical alignment process, and the lens would fall off easily. Besides, when combining the lens and the package frame, suspended particles and other contaminations might attach onto the sensitive surface of the sensor chip. Actually, in some applications, such as proximity sensing of human body, no lens is required. For example, when an optical sensor in a mobile phone detects that a user picks up a phone call and lifts the receiver to his ear, the display would be temporarily shut down. Such applications do not need a lens to focus light onto the optical sensor. However, if the optical sensor is not sealed up because it does not need a lens, it would have a higher risk of sensor break down.
On the other hand, due to the hardware limitation or the application requirement of an optical sensor, reducing light intensity to impart on the optical sensor or filtering out certain wavelength of light to the optical sensor might be required under some conditions. Conventionally, an additional filter is required for this purpose, while it increases the cost of the hardware and assembly process and the risk of inaccurate in the optical path.